import React from 'react';
import { Switch } from 'antd';

interface IsDisabledProps {
  isChecked: boolean;
  onChecked: () => void;
  checkedChildren: string;
  unCheckedChildren: string;
}

const IsDisabled: React.FC<IsDisabledProps> = ({
  isChecked,
  onChecked,
  checkedChildren,
  unCheckedChildren,
}) => {
  return (
    <Switch
      checkedChildren={checkedChildren}
      unCheckedChildren={unCheckedChildren}
      defaultChecked={isChecked}
      onChange={onChecked}
    />
  );
};

export default IsDisabled;
